package keter.combofs.util;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.Date;

/**
 * Created by gulx@neusoft.com on 2019/12/2.
 */
public class DateUtil {
    public static Date expiredMinutes(long minutes) {
        LocalDateTime localDateTime = LocalDateTime.now();
        ZoneId zone = ZoneId.systemDefault();
        Instant instant = localDateTime.atZone(zone).toInstant();
        instant = instant.plus(minutes, ChronoUnit.MINUTES);
        return Date.from(instant);
    }
}
